<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Title</title>
    <meta content="" charset="UTF-8">
    <script language="JavaScript" src="script/vue.js"></script>
    <script type="" language="JavaScript">
        window.onload = function () {
            var vue = new Vue({
                // # 表示id
                // . 表示class
                "el": "#div0",
                "data": {
                    num: 2
                }
            });
        }
    </script>
</head>
<body>
<div id="div0">
    <input type="text" v-model="num"></input>
    <!-- 特别注意 v-if和 v-else中间不能有其它结点 -->
    <div v-if="num%2==0" style="width: 200px;height: 200px;background-color: aqua;">&nbsp;</div>
    <div v-else="num%2==0" style="width: 200px;height: 200px;background-color: crimson;">&nbsp;</div>
    <!--<div v-show="num%2==0" style="width: 200px;height: 200px;background-color: lime;">&nbsp;</div>-->

</div>

</body>
</html>